/*
 * led.h
 *
 *  Created on: 02.06.2012
 *      Author: Roma Jam
 */

#ifndef LED_H_
#define LED_H_

#define LED_GPIO_PORT       GPIOC
#define LED_GPIO_CLK        RCC_APB2Periph_GPIOC

#define LEDG_PIN            GPIO_Pin_9
#define LEDB_PIN            GPIO_Pin_8

#define LEDG_ON()           GPIO_SetBits(LED_GPIO_PORT,LEDG_PIN)
#define LEDB_ON()           GPIO_SetBits(LED_GPIO_PORT,LEDB_PIN)
#define LEDG_OFF()          GPIO_ResetBits(LED_GPIO_PORT,LEDG_PIN)
#define LEDB_OFF()          GPIO_ResetBits(LED_GPIO_PORT,LEDB_PIN)
#define LEDG_TOGGLE()       LED_GPIO_PORT->ODR ^= LEDG_PIN
#define LEDB_TOGGLE()       LED_GPIO_PORT->ODR ^= LEDB_PIN

class led_t{
private:
public:
    void Init(void);
};
extern led_t Led;
#endif /* LED_H_ */
